package com.example.qxfw.slhx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.qxfw.common.entity.qx.SatelliteNephoram3;
import com.example.qxfw.common.util.DateUtil;
import com.example.qxfw.hbqx.mapper.SatelliteNephoram3Mapper;
import com.example.qxfw.slhx.service.HydfxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class HydfxServiceImpl implements HydfxService {
    @Autowired
    private SatelliteNephoram3Mapper satelliteNephoram3Mapper;
    @Override
    public List<SatelliteNephoram3> getAllOfSatelliteNephoram3(String startDatechar, String endDatechar) {

        Timestamp start = DateUtil.localDateTimeToTimestamp(DateUtil.stringToLocalDateTime(startDatechar));
        Timestamp end = DateUtil.localDateTimeToTimestamp(DateUtil.stringToLocalDateTime(endDatechar));
        return satelliteNephoram3Mapper.selectList(new LambdaQueryWrapper<SatelliteNephoram3>()
        .between(SatelliteNephoram3::getDatechar, start, end));
    }
}
